import exp from "constants"
import React, { FC, useState } from "react"

const Demo: FC = () => {
    // let count = 0 普通的js变量，无法触发组件的更新
  const [count, setCount] = useState(0)
  function add() {
    setCount(count + 1)
    console.log("cur count", count)
  }
  return (
    <div>
      <button onClick={add}>add {count}</button>
    </div>
  )
}
export default Demo
